﻿using System.ComponentModel.DataAnnotations;
using NetSurveillance.WebApp.DataServices.Resources;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Alias("Cases")]
    public class Case : BaseModel
    {
        [AutoIncrement]
        public long Id { get; set; }

        [Display(Name = "CaseName",ResourceType = typeof(ModelResource))]
        [Required(AllowEmptyStrings = false)]
        [StringLength(30)]
        public string Name { get; set; }

        [Display(Name = "CaseDesc", ResourceType = typeof(ModelResource))]
        [StringLength(200)]
        public string Desc { get; set; }

        [References(typeof(User))]
        public long CreateUserId { get; set; }

        [Ignore]
        public User CreatedUser { get; set; }
    }
}
